require.config({
  paths: {
    "zepto": "/js/zepto.min",
    "http": "/js/http.min",
    "config": "/js/config.min"
  }
});


require(['http', 'config', 'zepto'], function (http, config, $) {
  console.log('test page');

  $('#submitbtn').on('click', function () {

    $.ajax({
      url: '/upload_file',
      type: 'post',
      dataType: "json",
      data: $('#uploadForm').serialize(),
      success: function (res) {
        console.log(res);
      }, error: function (error) { console.log(error); }
    });
  });

  $('#testbtn').on('click', function() {
    http.request('/get_test_data', 'get', null, function(res) {
      console.log(res);
    });
  });

});